﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.RobotJog.Controls.CUiRJJointsColumnData
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System;
using System.ComponentModel;


namespace DnProcessSimulateCommands.RobotJog.Controls;

public class CUiRJJointsColumnData
{
  public CUiRJJointsColumnData(string name, string caption, bool visible = true)
  {
    this.ColumnName = name;
    this.ColumnCaption = caption;
    this.Visible = visible;
  }

  [DisplayName("V")]
  public bool Visible { get; set; }

  [DisplayName("Column")]
  public string ColumnCaption { get; set; }

  public string ColumnName { get; set; }

  public override string ToString() => this.ColumnCaption;

  public string SerializeData()
  {
    return $"{this.ColumnName + ";"}{this.ColumnCaption};" + this.Visible.ToString();
  }

  public static CUiRJJointsColumnData DeserializeString(string serializedString)
  {
    string[] strArray = serializedString.Split(';');
    string name = strArray[0];
    string caption = strArray[1];
    bool boolean = Convert.ToBoolean(strArray[2]);
    return new CUiRJJointsColumnData(name, caption)
    {
      Visible = boolean
    };
  }
}
